// 测试 Function.prototype.apply 函数

let monkey = {
    name: '孙悟空' ,
    add( a , b ) {
        let c = a + b ;
        console.log( `${this.name}掐指一算${a}加上${b}等于${c}`);
        return c ;
    } 
}

monkey.add( 100 , 200 );

let dog = {  name: '旺财'  }

let fun = monkey.add ;

let f1 = fun.bind( dog ); 
f1( 10 , 20 );

let cat = { name : '汤姆' }

let f2 = monkey.add.bind( cat );
f2( 10, 20 );
